package myList_1009.practice;


import myList_1009.MyList;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class MyArrayList implements MyList {
    // 定义属性
    private Long[] array;   // array.length 也就是我们的容量（capacity）
    private int size;
    private void ensureCapacity(){
        //不需要扩容
        if(this.size<this.array.length){
            return;
        }
        int newLength=this.array.length*2;
        Long []newArray=new Long[newLength];
        for (int i = 0; i < newLength; i++) {
            newArray[i]=this.array[i];
        }
        this.array=newArray;
    }

    @Override
    public int size() {
        return 0;
    }

    @Override
    public boolean add(Long e) {
        return false;
    }

    @Override
    public void add(int index, Long e) {

    }

    @Override
    public Long remove(int index) {
        return null;
    }

    @Override
    public boolean remove(Long e) {
        return false;
    }

    @Override
    public Long get(int index) {
        return null;
    }

    @Override
    public Long set(int index, Long e) {
        return null;
    }

    @Override
    public int indexOf(Long e) {
        return 0;
    }

    @Override
    public int lastIndexOf(Long e) {
        return 0;
    }

    @Override
    public boolean contains(Long e) {
        return false;
    }

    @Override
    public void clear() {

    }

    @Override
    public boolean isEmpty() {
        return false;
    }
}

